package com.socialuni.sdk.user.phone;

import com.socialuni.sdk.model.DO.user.SocialPhoneNumDO;
import com.socialuni.sdk.model.DO.user.UserDO;
import com.socialuni.sdk.repository.SocialUserPhoneRepository;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

//授权用户信息
@Component
public class SocialPhoneNumManage {
    @Resource
    SocialUserPhoneRepository socialUserPhoneRepository;

    //创建手机号信息
    public void createUserPhoneNum(UserDO mineUser, String phoneCountryCode, String phoneNum) {
        SocialPhoneNumDO socialUserPhoneDO = new SocialPhoneNumDO(mineUser.getId(), phoneCountryCode, phoneNum);
        socialUserPhoneRepository.save(socialUserPhoneDO);
    }
}
